Everything Totally Explained


Ask & we'll explain, totally!
Parameter (computer science)
Totally Explained


  NEW! All the latest news in the worlds of computer gaming, entertainment, the environment,  
finance, health, politics, science, stocks & shares, technology and much, much, more.  


View this entry using RSS

Everything about Parameter Computer Science totally explained

In computer programming, a parameter is a variable which takes on the meaning of a corresponding argument passed in a call to a subroutine.In the most common case, call-by-value, a parameter acts within the subroutine as a local (isolated) copy of the argument, but in other cases, for example call-by-reference, the argument supplied by the caller can be affected by actions within the called subroutine (as discussed in evaluation strategy).
   Nearly all programming languages support subroutine parameters. The semantics for how parameters can be declared and how the arguments get passed to the parameters of subroutines are defined by the language, but the details of how this is represented in any particular computer system depends on the calling conventions of that system.

Parameters and arguments

A parameter represents a value that the procedure expects you to supply when you call it. The procedure's declaration defines its parameters.
   You can define a procedure with no parameters, one parameter, or more than one. The part of the procedure definition that specifies the parameters is called the parameter list.
   An argument represents the value you supply to a procedure parameter when you call the procedure. The calling code supplies the arguments when it calls the procedure. The part of the procedure call that specifies the arguments is called the argument list.
   Although parameters are also commonly referred to as arguments, arguments are more properly thought of as the actual values or references assigned to the parameter variables when the subroutine is called at runtime. When discussing code that's calling into a subroutine, any values or references passed into the subroutine are the arguments, and the place in the code where these values or references are given is the parameter list. When discussing the code inside the subroutine definition, the variables in the subroutine's parameter list are the parameters, while the values of the parameters at runtime are the arguments.
   Many programmers use parameter and argument interchangeably, depending on context to distinguish the meaning. In practice, distinguishing between the two terms is usually unnecessary in order to use them correctly or communicate their use to other programmers. Alternatively, the equivalent terms formal parameter and actual parameter may be used instead of parameter and argument.
   To better understand the difference, consider the following subroutine written in C:
int sum(int addend1, int addend2)
    PS> jennifer 'old' 'young' Young Jennifer: I'm old! Old Jennifer: I'm young!
    PS> jennifer -old 'young' -young 'old' Young Jennifer: I'm old! Old Jennifer: I'm young!

Further Information

Get more info on 'Parameter Computer Science'.


External Link Exchanges

Do you know how hard it is to get a link from a large encyclopaedia? Well we're different and will prove it. To get a link from us just add the following HTML to your site on a relevant page:

    <a href="http://parameter__computer_science.totallyexplained.com">Parameter (computer science) Totally Explained</a>

Then simply click through this link from your web page. Our crawlers will verify your link, extract the title of your web page and instantly add a link back to it. If you like you can remove the words Totally Explained and embed the link in article text.
   As long as your link remains in place, we'll keep our link to you right here. Please play fair - our crawlers are watching. Your site must be closely related to this one's topic. Any kind of spamming, dubious practises or removing the link will result in your link from us being dropped and, potentially, your whole site being banned.



Copyright © 2007-8 totallyexplained.com | Licensed under the GNU Free Documentation License | Site Map
This article contains text from the Wikipedia article Parameter (computer science) (History) and is released under the GFDL | RSS Version